package com.glsc.ngateway.common.base.domainmapper;

import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.ProcessEditConfig;
import com.glsc.ngateway.common.api.flowable.dto.task.config.ProcessEditConfigDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Author: tangyf
 * @Date: 2021/12/1
 * @Desc: domin到dto转换
 */
@Mapper(componentModel = "spring")
public interface ProcessEditConfigMapper {

    ProcessEditConfigMapper INSTANCE = Mappers.getMapper(ProcessEditConfigMapper.class);

    @Mapping(target = "editFieldList", ignore = true)
    @Mapping(target = "editFieldWithDtoMap", ignore = true)
    @Mapping(target = "optionalEditFieldList", ignore = true)
    @Mapping(target = "optionalEditFieldWithDtoMap", ignore = true)
    @Mapping(target = "docTypeViewList", ignore = true)
    @Mapping(target = "docTypeEditList", ignore = true)
    ProcessEditConfigDto domain2dto(ProcessEditConfig domain);

    List<ProcessEditConfigDto> domain2dto(List<ProcessEditConfig> domain);

    ProcessEditConfig dto2domain(ProcessEditConfigDto dto);

    List<ProcessEditConfig> dto2domain(List<ProcessEditConfigDto> dto);
}
